import {ConfigProvider} from "antd";
import Router from "@/router/Router.tsx";
import {changeLanguage} from "@/language";
import LazyLoad from "@/router/LazyLoad.tsx";
import useSystemStore, {SystemStoreState} from "@/store/modules/system";

const App = () => {
    const {language, componentSize} = useSystemStore((state: SystemStoreState) => state);
    changeLanguage(language).then(() => undefined)
    return (
        <ConfigProvider componentSize={componentSize}>
            <LazyLoad>
                <Router></Router>
            </LazyLoad>
        </ConfigProvider>
    )
};

export default App;